from loguru import logger

SERVERS = "localhost:9092"
GROUP_ID = "model"

logger.add('err.log', level="ERROR", retention="7 days")


# 定义Kafka消息结构(dict中的关键结构)
class KafkaMsg(dict):
    # ID为消息的唯一标识符，data保存输入/输出的json字符串 reqState为请求状态
    def __init__(self, ID: int, data: str, reqState: int):
        super().__init__(ID=id, data=data, reqState=reqState)
